package com.newer.his.common.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;


import com.newer.his.common.entity.Doctor;
/**
 * 员工信息Mapper
 * @author Tang
 *
 */
@Mapper
interface DoctorMapper {
	
	@Result(  property= "id",column = "doctor_id")
	@Select(" select doctor_id, `name`,tel,sex,`rank`,`account`,`password` from doctor where doctor_id = #{id}")
	public Doctor findById(int id);
	
	
//	医生对象
//	private int id; 
//	private String name; 
//	private String tel; 
//	private String sex;
//	private String rank;
//	private String account;
//	private String password;
	@Select("select doctor_id ,`name` ,tel,sex ,`rank`,`password` from doctor where doctor_id=#{id}")
	@Results(
			id="",
			value={
				@Result(column = "doctor_id",property = "id"),
				@Result(column = "name",property = "name"),	
				@Result(column = "tel",property = "tel"),
				@Result(column = "sex",property = "sex"),
				@Result(column = "rank",property = "rank"),
				@Result(column = "account",property = "account"),
				@Result(column = "password",property = "password")
				}
			)
	Doctor Did(int id);
	

}
